package org.laobai.common.asserts;

import org.laobai.common.exception.BPException;

import java.util.Collection;
import java.util.Objects;

public class Asserts {

    public static void isNotNull(Object object,String msg){
        if(Objects.isNull(object)){
            throw  new BPException(msg);
        }
    }

    public static void isNotNull(Collection collection, String msg){
        if(Objects.isNull(collection)||collection.isEmpty()){
            throw  new BPException(msg);
        }
    }
}
